fldmeta_prop.func.SubProcessCollapsed = {};
fldmeta_prop.func.SubProcessCollapsed.predefined = {};

//select reference process
/*fldmeta_prop.func.SubProcessCollapsed.setProcessRef = function(rId, cId) {
	var w1 = fm_createCenterWindow('wid_setProcessRef', fmd_i18n_prop_processRef, 800, 600);
	
	var lo1 = w1.attachLayout("3U");
	lo1.cells('a').hideHeader();
	lo1.cells('b').setText(fmd_i18n_prop_pr_version);
	lo1.cells('c').hideHeader();
	lo1.cells('a').setWidth(300);
	lo1.cells('c').setHeight(50);
	
	var bom = {};
	var gridstb = lo1.cells('b').attachStatusBar();
	gridstb.setText("<div id='id_setProcessRef_paging_stb1'></div>");
	
	//tree
	//按钮栏
	var tb_tree = lo1.cells('a').attachToolbar();
	tb_tree.setIconsPath(flvar.iconpath);
	tb_tree.loadStruct('<toolbar><item type="button" id="expandAll" text="'+fmd_i18n_prop_expand+'" img="expand1.png"/><item type="button" id="foldAll" text="'+fmd_i18n_prop_collapse+'" img="fold1.png"/></toolbar>', function() {});
	
	//流程定义树
	mytree1 = lo1.cells('a').attachTree();
	mytree1.setIconsPath(dhtmlx.image_path+"dhxtree_web/");
	mytree1.setImagesPath(dhtmlx.image_path+"dhxtree_web/");
	
	mytree1.attachEvent("onClick", function(_id, object){mytree1.selectItem(_id);});
	mytree1.attachEvent("onRightClick", function(_id, object){mytree1.selectItem(_id);});
	mytree1.attachEvent("onDblClick", function(sid){mytree1.selectItem(sid);});
	
	mytree1.attachEvent("onSelect", function(sid){
		if (sid.indexOf("FLOW-")>=0) {
			if (sid==fl.curflow.id) {
				msg(fmd_i18n_prop_msg_cannotselectselfprocess);
				mytree1.clearSelection();
				return;
			}
			bom.bpdId = sid;
			bom.bpdName = mytree1.getSelectedItemText();
			bom_toPage(1, 10);
		}
	});
	
    //tree buttons
    tb_tree.attachEvent('onClick', function(btid){
    	if (btid == "foldAll") {
        	mytree1.closeAllItems("0");
        } else if (btid == "expandAll"){
        	mytree1.openAllItems("0");
        };
    });
	
	var str2 = [{ type:"block" , name:"form_block_1", offsetLeft:(dhx_skin=="dhx_web"?"333":"337"), offsetTop:"0", list:[{ type:"button" , name:"fb_ok", value:fmd_i18n_b_ok, inputTop:0  }]}];
	var fm2 = lo1.cells('c').attachForm(str2);
	fm2.attachEvent("onButtonClick", function(btid) {
		if (btid=='fb_ok') {
			var rid = ragrid.getSelectedRowId();
			if (rid) {
				var versionid = ragrid.cells(rid, 2).getValue();
				var versionname = ragrid.cells(rid, 3).getValue();
				var newval = {"id":ragrid.cells(rid, 1).getValue(), 
						"name":bom.bpdName, 
						"versionid":versionid, 
						"versionname":versionname,
						"displayValue":bom.bpdName+"("+versionid+")"};
				//change i18nname-zh
				fmdc.grid_prop.cells("i18nname-zh", fldmeta_prop.gridconf.idx.value).setValue(newval.name);
				fl.curflow.bpmnConfig[fl.curComp.id]["i18nname-zh"] = newval.name;
				//change process label
				var elem = getIORegistedElem(fl.curComp.id);
				bi.labelUtil.setLabel(elem, newval.name);
				//workaround on process
				Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual text").remove();
				bi.renderEmbeddedLabel(Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual"), elem, 'center-middle');
				fmdc.grid_prop.cells(rId, cId).setValue(newval, true);	//第二个参数必须为true，触发事件
			}else{
				msg(fmd_i18n_prop_msg_plsselbpdNversion);
				return;
			}
			w1.close();
		}
	});
	
	//定义grid
	var ragrid = lo1.cells('b').attachGrid();
	ragrid.setHeader([fmd_i18n_order,
	                  "BPD_ID",
	                  fmd_i18n_prop_pr_versionno,
	                  fmd_i18n_prop_pr_version,
	                  fmd_i18n_prop_description,
	                  fmd_i18n_prop_pr_creator,
	                  fmd_i18n_prop_pr_createtime
	                  ],
	                  null,
	                    ["text-align:center;",
	                     "text-align:center;",
	                     "text-align:center;",
	                     "text-align:center;",
	                     "text-align:center;",
	                     "text-align:center;",
	                     "text-align:center;"]);
	ragrid.attachHeader("#rspan,&nbsp;,#rspan,"+
			"<input id='sr_boname' type='text' style='width:90%'/>,"+
			"<input id='sr_bodesc' type='text' style='width:90%'/>,#rspan,#rspan");
	ragrid.setInitWidths("60,100,60,150,150,80,125");
	ragrid.setColumnIds("NO,BPD_ID,VERSIONID,VERSIONNAME,VERSIONDESC,CREATOR_NAME,CREATOR_TIME");
	ragrid.setColTypes("ro,ro,ro,ro,ro,ro,ro");
	ragrid.setColSorting("int,na,str,str,str,str,str");
	ragrid.setColumnsVisibility("false,true,false,false,false,false,false");
	ragrid.setColAlign("center,left,right,left,left,center,center");
	ragrid.setEditable(false);
	ragrid.setLang(flvar.lang);
	
	//paging
	ragrid.setPagingWTMode(true,true,true,[10,20,50,100]);
	ragrid.enablePaging(true,10,5,'id_setProcessRef_paging_stb1');
	ragrid.setPagingSkin("toolbar", dhx_skin);
	
	//default ordering
	ragrid.grid_setOrderColumns([{"VERSIONID":"DESC"}]);
	
	ragrid.init();
	
	ragrid.attachEvent("onPageChanged", function(ind,fInd,lInd){
		bom_toPage(fInd+1, lInd);
	});
	
	//header click event
	ragrid.attachEvent("onHeaderClick", grid_onHeaderClick);
	
	ragrid.attachEvent("onRowDblClicked", function(rid) {
		var versionid = ragrid.cells(rid, 2).getValue();
		var versionname = ragrid.cells(rid, 3).getValue();
		var newval = {"id":ragrid.cells(rid, 1).getValue(), 
				"name":bom.bpdName, 
				"versionid":versionid, 
				"versionname":versionname,
				"displayValue":bom.bpdName+"("+versionid+")"};
		//change i18nname-zh
		fmdc.grid_prop.cells("i18nname-zh", fldmeta_prop.gridconf.idx.value).setValue(newval.name);
		fl.curflow.bpmnConfig[fl.curComp.id]["i18nname-zh"] = newval.name;
		//change process label
		var elem = getIORegistedElem(fl.curComp.id);
		bi.labelUtil.setLabel(elem, newval.name);
		//workaround on process
		Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual text").remove();
		bi.renderEmbeddedLabel(Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual"), elem, 'center-middle');
		fmdc.grid_prop.cells(rId, cId).setValue(newval, true);	//第二个参数必须为true，触发事件
		w1.close();
	});
	
	//bind searcher event
	//disable onclick order by function for this header
	var trsr_boname = $("#sr_boname").parents('tr:first');
	trsr_boname.find('td').bind('click',bom_stopEvent);
	trsr_boname.find('td').bind('mouseover',bom_stopEvent);
	$("#sr_boname").bind('keypress', bom_enterQuery);
	$("#sr_bodesc").bind('keypress', bom_enterQuery);
	
	//call query bo
	function bom_enterQuery(e) {
		if (e.keyCode==13) {
			bom.boquery_boname = $.trim($("#sr_boname").val());
			bom.boquery_bodesc = $.trim($("#sr_bodesc").val());
			bom_toPage(1, 10);
		}
	}

	//query bo
	function bom_toPage(fromRow, toRow){
		if (!bom.bpdId) {
			msg(fmd_i18n_prop_msg_plsselbpd);
			return;
		}
		lo1.progressOn();
		var p = {"queryParams":{"bpdId":bom.bpdId}, "fromRow":fromRow, "toRow":toRow, "timezoneOffset":new Date().getTimezoneOffset(),
				"ordercolumns":JSON.stringify(ragrid._grid_ordercolumns)};
		bom.boquery_boname && (p.queryParams.versionname = bom.boquery_boname);
		bom.boquery_bodesc && (p.queryParams.versiondesc = bom.boquery_bodesc);
		p.queryParams = JSON.stringify(p.queryParams);
		var ret = doPostAsyncJson(flvar.bpmeRest + '/flow/queryVersion', p, function(ret){
			lo1.progressOff();
			if (!ret) {
				msgErr(fmd_i18n_msg_readfail);
				return;
			}
			ragrid.clearAllInPaging();
			ragrid.parse(ret, "json");
		});
	}

	//stop event propagation
	function bom_stopEvent(e){
		if (e && e.stopPropagation!=undefined) {
			e.stopPropagation();
		} else if (window.event){
			window.event.cancelBubble = true;
		}
		return false;
	}
	
	//init data
    var ret = doGetSyncJson(flvar.bpmeRest + "/flowTree/getTreeMenu");
	mytree1.loadJSONObject(ret);
};*/

//select reference process
fldmeta_prop.func.SubProcessCollapsed.setProcessRef = function(rId, cId) {
	
	if (!fmdc.grid_prop.isEditor) {
		msg(fmd_i18n_msg_cannotchangeinreadonly);
		return;
	}
	
	var w1 = fm_createCenterWindow('wid_setProcessRef', fmd_i18n_prop_processRef, 400, 600);
	
	var lo1 = w1.attachLayout("2E");
	lo1.cells('a').hideHeader();
	lo1.cells('b').hideHeader();
	lo1.cells('b').setHeight(50);
	
	//tree
	//按钮栏
	var tb_tree = lo1.cells('a').attachToolbar();
	tb_tree.setIconsPath(flvar.iconpath);
	tb_tree.loadStruct('<toolbar><item type="button" id="expandAll" text="'+fmd_i18n_prop_expand+'" img="expand1.png"/><item type="button" id="foldAll" text="'+fmd_i18n_prop_collapse+'" img="fold1.png"/><item type="buttonInput" id="processRefTreeFinder" width="100" title="'+fmd_i18n_prop_tip_quickfind+'"/><item type="button" id="processRefTreeFinderBt" img="find.png"/></toolbar>', function() {});
	tb_tree.addSpacer("foldAll");
	
	//流程定义树
	mytree1 = lo1.cells('a').attachTree();
	mytree1.setIconsPath(dhtmlx.image_path+"dhxtree_web/");
	mytree1.setImagesPath(dhtmlx.image_path+"dhxtree_web/");
	
	mytree1.attachEvent("onClick", function(_id, object){
		mytree1.selectItem(_id);
    });
	mytree1.attachEvent("onRightClick", function(_id, object){
		mytree1.selectItem(_id);
    });
	
	mytree1.attachEvent("onDblClick", function(sid){
		if (sid.indexOf("FLOW-")>=0) {
			if (sid==fl.curflow.id) {
				msg(fmd_i18n_prop_msg_cannotselectselfprocess);
				return;
			}
			var newval = {"id":sid, "name":mytree1.getSelectedItemText()};
			//change i18nname-zh
			fmdc.grid_prop.cells("i18nname-zh", cId).setValue(newval.name);
			fl.curflow.bpmnConfig[fl.curComp.id]["i18nname-zh"] = newval.name;
			//change process label
			var elem = getIORegistedElem(fl.curComp.id);
			bi.labelUtil.setLabel(elem, newval.name);
			//workaround on process
			Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual text").remove();
			bi.renderEmbeddedLabel(Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual"), elem, 'center-middle');
			fmdc.grid_prop.cells(rId, cId).setValue(newval, true);	//第二个参数必须为true，触发事件
			/*if (fl.curComp && fl.curComp.id && fl.curflow.bpmnConfig && fl.curflow.bpmnConfig[fl.curComp.id]) {
				fl.curflow.bpmnConfig[fl.curComp.id][rId] = newval;
			}*/
			w1.close();
		}
    });
	
    //tree buttons
    tb_tree.attachEvent('onClick', function(btid){
    	if (btid == "foldAll") {
        	mytree1.closeAllItems("0");
        } else if (btid == "expandAll"){
        	mytree1.openAllItems("0");
        } else if (btid == "processRefTreeFinderBt"){
        	var txt = tb_tree.getValue('processRefTreeFinder');
    		txt && mytree1.findItem(txt, 0);
        };
    });
    tb_tree.attachEvent('onEnter', function(btid){
    	if (btid == "processRefTreeFinder") {
    		var txt = tb_tree.getValue(btid);
    		txt && mytree1.findItem(txt, 0);
        }
    });
	
	var str2 = [{ type:"block" , name:"form_block_1", offsetLeft:(dhx_skin=="dhx_web"?"133":"140"), offsetTop:"0", list:[{ type:"button" , name:"fb_ok", value:fmd_i18n_b_ok, inputTop:0  }]}];
	var fm2 = lo1.cells('b').attachForm(str2);
	fm2.attachEvent("onButtonClick", function(btid) {
		if (btid=='fb_ok') {
			var sid = mytree1.getSelectedItemId();
			if (sid.indexOf("FLOW-")>=0) {
				if (sid==fl.curflow.id) {
					msg(fmd_i18n_prop_msg_cannotselectselfprocess);
					return;
				}
				var newval = {"id":sid, "name":mytree1.getSelectedItemText()};
				//change i18nname-zh
				fmdc.grid_prop.cells("i18nname-zh", fldmeta_prop.gridconf.idx.value).setValue(newval.name);
				fl.curflow.bpmnConfig[fl.curComp.id]["i18nname-zh"] = newval.name;
				//change process label
				var elem = getIORegistedElem(fl.curComp.id);
				bi.labelUtil.setLabel(elem, newval.name);
				//workaround on process
				Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual text").remove();
				bi.renderEmbeddedLabel(Snap("g[data-element-id='"+fl.curComp.id+"'] g.djs-visual"), elem, 'center-middle');
				fmdc.grid_prop.cells(rId, fldmeta_prop.gridconf.idx.value).setValue(newval, true);	//第二个参数必须为true，触发事件
				/*if (fl.curComp && fl.curComp.id && fl.curflow.bpmnConfig && fl.curflow.bpmnConfig[fl.curComp.id]) {
				fl.curflow.bpmnConfig[fl.curComp.id][rId] = newval;
				}*/
			}else{
				msg(fmd_i18n_prop_msg_plsselprocess);
				return;
			}
			w1.close();
		}
	});
	
	//init data
    var ret = doGetSyncJson(flvar.bpmeRest + "/bpdTree/getBpdTreeDhx");
	mytree1.loadJSONObject(ret);
	mytree1.openAllItems("0");
	$(tb_tree.getInput('processRefTreeFinder')).focus();
};

//on color change of SubProcess
fldmeta_prop.func.SubProcessCollapsed.onDisplayStyle = function(elemid, rId, nv) {
	if (rId=="displayStyle_bgColor") {
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual rect").attr({"fill" : nv || "#fafdde"});
	} else if (rId=="displayStyle_bgOpacity") {
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual rect").attr({ opacity: Number(nv) || 0.8});
	} else if (rId=="displayStyle_ActivityIconColor") {
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual").selectAll("path").forEach(function(el){
			el.attr({"stroke" : nv || "#000000"});
		});
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual").selectAll("rect").forEach(function(el){
			if (14==el.attr("width")) el.attr({"stroke" : nv || "#000000"});
		});
	} else if (rId=="displayStyle_BorderEffect") {
		if (nv=='none' || !nv) {
			Snap("g[data-element-id='"+elemid+"'] g.djs-visual rect").attr("filter", null);
		} else {
			Snap("g[data-element-id='"+elemid+"'] g.djs-visual rect").attr("filter","url(#"+nv+")");
		}
	} else if (rId=="displayStyle_BorderStrokeWidth") {
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual rect").attr({"strokeWidth" : parseInt(nv)});
	} else if (rId=="displayStyle_BorderColor") {
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual rect").attr({"stroke" : nv});
	} else if (rId=="displayStyle_fontColor") {
		Snap("g[data-element-id='"+elemid+"'] g.djs-visual text").attr({"fill" : nv || "#000000"});
	}
};

//on SubProcessCollapsed added
/*fldmeta_prop.funcOnCompAdded.SubProcessCollapsed = function(elemid, elem) {
	console.log("binding++++++++++++");
	console.log(Snap("svg g[data-element-id='"+elemid+"'] g.djs-visual rect[width='14']"));
	Snap("svg g[data-element-id='"+elemid+"'] g.djs-visual rect[width='14']").click(function(e){
		console.log(e);
		fl_stopEvent(e);
	});
};*/

fldmeta_prop.func.SubProcessCollapsed.showProcessRef = function(rId, cId) {
	//console.log(fmdc.grid_prop.cells(rId, cId).getValue());
	var val = fmdc.grid_prop.cells(rId, cId).getValue();
	if (val && val.id) {
		openWindowByUrl(new Date().getTime(), flvar.url_viewbpd+val.id);
	}
};

//set data mapping 数据映射
fldmeta_prop.func.SubProcessCollapsed.predefined["dataMapping"] = {
    	"name" : fmd_i18n_prop_dataMapping,
    	"img" : "dataMapping.png",
    	"tooltip" : fmd_i18n_tooltip_dataMapping,
    	"cellType" : {
    		"type" : "btnex",
    		"config" : {
				"onclick" : fldmeta_prop.func.callSetDataMapping
			}
    	},
    	"value" : {"default":null},
    	"validatorFunc" : function(elemid, val, prefix) {
    		//验证是异步的，必须返回后再弹出验证信息
    		fldmeta_prop.func.getActivityVarsAndCheckValWithCallback(elemid, val, function(elemid, val, activityVars) {
    			if (!activityVars) return;
    			if (!val || MyUtilJs.isEmpty(val)) {
					if (!MyUtilJs.isEmpty(activityVars.input) || !MyUtilJs.isEmpty(activityVars.output)) {
						fl_pushValidationErr(elemid, "dataMapping", "warning", prefix + fmd_i18n_msg_noDatamapping);
					}
				} else {
					//检查映射的表单变量和流程变量是否有效
					for (var io in val) {
						var ioname = io=="input" ? fmd_i18n_title_dataMapping_input : fmd_i18n_title_dataMapping_output;
						for (var fv in val[io]) {
							//流程变量
							if (!fldmeta_prop.func.isValidProcessVar(val[io][fv])) {
								fl_pushValidationErr(elemid, "dataMapping", "error", prefix + 
										ioname + fmd_i18n_msg_invalidmappingpvar +val[io][fv]);
							}
						}
					}
					//检查是否有未映射的
					var missing = false;
					if (!MyUtilJs.isEmpty(activityVars.input)) {
    					var in1 = val.input;
    					if (!in1) {
    						fl_pushValidationErr(elemid, "dataMapping", "warning", prefix + fmd_i18n_msg_noDatamapping);
    						missing = true;
    					} else {
    						var matchs1 = JSONSelect.match(":has(:root > .type)", activityVars.input);
    						//过滤prerequisite
    						var matchs = [];
    						for (var i in matchs1) {
    							!matchs1[i].path && (matchs.push(matchs1[i]));
    						}
    						//console.debug(matchs.length+"  >  "+MyUtilJs.getJsonKeyLength(in1));
    						if (matchs.length > MyUtilJs.getJsonKeyLength(in1)) {
    							fl_pushValidationErr(elemid, "dataMapping", "warning", prefix + fmd_i18n_msg_noDatamapping);
    							missing = true;
    						}
    					}
    				}
    				if (!missing && !MyUtilJs.isEmpty(activityVars.output)) {
    					var out1 = val.output;
    					if (!out1) {
    						fl_pushValidationErr(elemid, "dataMapping", "warning", prefix + fmd_i18n_msg_noDatamapping);
    					} else {
    						var matchs1 = JSONSelect.match(":has(:root > .type)", activityVars.output);
    						//过滤prerequisite
    						var matchs = [];
    						for (var i in matchs1) {
    							!matchs1[i].path && (matchs.push(matchs1[i]));
    						}
    						//console.debug(matchs.length+"  >  "+MyUtilJs.getJsonKeyLength(out1));
    						if (matchs.length > MyUtilJs.getJsonKeyLength(out1)) {
    							fl_pushValidationErr(elemid, "dataMapping", "warning", prefix + fmd_i18n_msg_noDatamapping);
    						}
    					}
    				}
				}
    		});
    	}
    };

//properties settings for SubProcess
fldmeta_prop.control.SubProcessCollapsed = {
		"includes-properties" : {
			"common" : fldmeta_prop.common.all.properties,
			"activitycommon" : fldmeta_prop.common.activity.properties
		},
		"properties" : {
			"processRef" : {
    			"name" : fmd_i18n_prop_processRef,
    			"cellType" : {
    				"type" : "btnex",
    				"config" : {
    					"displayValue" : "displayValue",
	    				"onclick" : fldmeta_prop.func.SubProcessCollapsed.setProcessRef,
	    				"onclick1" : fldmeta_prop.func.SubProcessCollapsed.showProcessRef,
                        "ishidebtn" : function(){return !fmdc.grid_prop.isEditor},
	    				"imgName1" : "view1.png"
	    			}
    			},
		    	"img" : "processRef.png",
		    	"value" : {"default" : {}},
		    	"validatorFunc" : function(elemid, value, prefix) {
		    		if (MyUtilJs.isEmpty(value)) {
		    			fl_pushValidationErr(elemid, "processRef", "error", prefix + fmd_i18n_vld_failed + " " + fldmeta_prop.runtime_validators_i18n["NotEmptyObject"]);
		    		}
		    		//TODO
		    		return null;
		    	},
		    	"sub" : {
		    		"dataMapping" : fldmeta_prop.func.SubProcessCollapsed.predefined["dataMapping"]
		    	}
    		}/*,
    		"route" : fldmeta_prop.common.predefined["route"],
		    "duration" : fldmeta_prop.common.predefined["duration"],
		    "manualRemind" : fldmeta_prop.common.predefined["manualRemind"],
		    "remind" : fldmeta_prop.common.predefined["remind"],
		    "autoCompleteOnExpiration" : fldmeta_prop.common.predefined["autoCompleteOnExpiration"]*/
		},
		"abandon-properties" : fldmeta_prop.func.getAbandonPropertiesForConditional,
		"validationDataPrepare" : {//验证时用到的需要提前从其他系统读取的配置信息
			//读取引用的流程和版本稍后做有效性验证
			"processRef" : function(elemid) {
				var pr = fl.curflow.bpmnConfig[elemid]["processRef"];
				if (!MyUtilJs.isEmpty(pr)) {
					/*return doPostAsyncJson(flvar.fmdCtx+"/rest/fmd/getVersion", {"formid":form1.formid, "versionid":form1.versionid},
							function(ret){
								//console.log(ret);
								if (!ret) return;
								fl.curflow.otherConfig.validationData[elemid]["bindedFormModels"] = fldmeta_prop.func.UserTask.parseModelToInputOutput(ret);
							}
						);*/
				}
				return null;
			}
		},
		"styles" : {
			"displayStyle" : {
				"name" : fmd_i18n_prop_tip_customstyle,
				"img" : "css.png",
		    	"cellType" : {
		    		"type" : "coro",
		    		"options" : fmd_i18n_prop_displayStyle_vals
		    	},
		    	"value" : {"default":"theme"},
		    	"conditional-sub" : {
		    		"custom" : {
		    			"displayStyle_bgColor" : function() {
		    				var obj1 = MyUtilJs.copyObj(fldmeta_prop.common.predefined["displayStyle_bgColor"]);
		    				obj1.value["default"] = flstyle.elem.attrs.subprocess.fill;
		    				return obj1;
		    			},
		        		"displayStyle_bgOpacity" : function() {
		    				var obj1 = MyUtilJs.copyObj(fldmeta_prop.common.predefined["displayStyle_bgOpacity"]);
		    				obj1.value["default"] = flstyle.elem.attrs.subprocess.opacity;
		    				return obj1;
		    			},
		    			"displayStyle_ActivityIconColor" : function() {
		    				var obj1 = MyUtilJs.copyObj(fldmeta_prop.common.predefined["displayStyle_ActivityIconColor"]);
		    				obj1.value["default"] = flstyle.elem.defaultActivityIconColor;
		    				return obj1;
		    			},
		        		"displayStyle_fontColor" : function() {
		    				var obj1 = MyUtilJs.copyObj(fldmeta_prop.common.predefined["displayStyle_fontColor"]);
		    				obj1.value["default"] = flstyle.elem.defaultFontColor;
		    				return obj1;
		    			},
		        		"displayStyle_BorderStrokeWidth" : function() {
		    				var obj1 = MyUtilJs.copyObj(fldmeta_prop.common.predefined["displayStyle_BorderStrokeWidth"]);
		    				obj1.value["default"] = flstyle.elem.attrs.subprocess.strokeWidth;
		    				return obj1;
		    			},
		        		"displayStyle_BorderColor" : function() {
		    				var obj1 = MyUtilJs.copyObj(fldmeta_prop.common.predefined["displayStyle_BorderColor"]);
		    				obj1.value["default"] = flstyle.elem.attrs.subprocess.stroke;
		    				return obj1;
		    			},
		        		"displayStyle_BorderEffect" : fldmeta_prop.common.predefined["displayStyle_BorderEffect"]
		    		}
		    	}
			}
		},
		"propDhxGridEvents" : {
			"onCellChanged" : function(rId,cId,nv) {
				fldmeta_prop.func.onCellChanged_common(rId,cId,nv,
						JSONSelect.match("."+rId, fldmeta_prop.control.SubProcessCollapsed));
				fldmeta_prop.func.onCellChanged_remind(rId,cId,nv);
				fldmeta_prop.func.onCellChanged_stylecommon(rId,cId,nv);
			}
		}
	};



